package com.oracle.application.feign;

import com.oracle.application.feign.vo.Phone;
import com.oracle.application.feign.vo.PhoneVo;
import com.oracle.application.vo.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author 张家城
 * @Date 2021-07-06 下午 3:08
 * @Version 1.0
 */
@FeignClient(value = "cloud-iphone-service",path = "/Phone" )
public interface PhoneFeign {

    @GetMapping("/list")
    public List<Phone> list();

    @PostMapping("/phoneAdd")
    public R<Phone> add(@RequestBody Phone Phone);


    @PostMapping("/phoneUpdate")
    public R<Phone> update(@RequestBody Phone phone);


    @PostMapping("/Id")
    public R<Phone> getPhoneId(@RequestBody Integer id);


    @PostMapping("/phoneId")
    public R<Phone> updatePhoneId(@RequestBody Integer id);

    @GetMapping("/page")
    public R page(Integer current, Integer pageSize, PhoneVo phoneVo);

}
